package ${project.packageName}.${project.moduleName}.domain.${tableStructure.className}.repository;

import ${project.packageName}.${project.moduleName}.domain.${tableStructure.className}.${tableStructure.classNameUppercase}Entity;
import ${project.packageName}.${project.moduleName}.domain.${tableStructure.className}.vo.${tableStructure.classNameUppercase}QueryVO;
import com.rabbitpre.tubit.core.page.PageData;
import com.rabbitpre.tubit.core.page.PageParam;

/**
 * ${tableStructure.tableComment}
 *
 * @author ${developer.author}
 * @date ${developer.datetime}
 */
public interface ${tableStructure.classNameUppercase}Repository {

    /**
     * 保存${tableStructure.tableComment}
     *
     * @param entity 实体
     * @return boolean
     */
    boolean add${tableStructure.classNameUppercase}(${tableStructure.classNameUppercase}Entity entity);

    /**
     * 根据主键id删除${tableStructure.tableComment}
     *
     * @param ${tableStructure.classNameUppercase}Id 素材id
     * @return boolean
     */
    boolean delete${tableStructure.classNameUppercase}ById(Long ${tableStructure.classNameUppercase}Id);

    /**
     * 根据主键id更新${tableStructure.tableComment}
     *
     * @param entity 素材实体
     * @return boolean
     */
    boolean update${tableStructure.classNameUppercase}ById(${tableStructure.classNameUppercase}Entity entity);

    /**
     * 根据id查询${tableStructure.tableComment}
     *
     * @param ${tableStructure.classNameUppercase}Id ${tableStructure.tableComment}id
     * @return ${tableStructure.classNameUppercase}Entity
     */
    ${tableStructure.classNameUppercase}Entity selectById(Long ${tableStructure.classNameUppercase}Id);

    /**
     * 根据条件分页查询${tableStructure.tableComment}
     *
     * @param ${tableStructure.classNameUppercase}QueryVO ${tableStructure.tableComment}条件
     * @param pageParam           分页条件
     * @return List<${tableStructure.classNameUppercase}Entity>
     */
    PageData<${tableStructure.classNameUppercase}Entity> queryPageList(${tableStructure.classNameUppercase}QueryVO ${tableStructure.classNameUppercase}QueryVO, PageParam pageParam);

}
